import 'package:flutter/material.dart';
import 'package:hook_up_rent/pages/profile/widgets/advertisement.dart';
import 'package:hook_up_rent/pages/profile/widgets/function_button.dart';
import 'package:hook_up_rent/pages/profile/widgets/header.dart';
import 'package:hook_up_rent/routes/index.dart';
import 'package:hook_up_rent/widgets/info/info_list.dart';

class ProfilePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // 改变header和appbar的横线
        elevation: 0,
        title: Text("我的"),
        centerTitle: true,
        actions: [
          IconButton(
              onPressed: () {
                Navigator.of(context).pushNamed(MyRoutes.settings);
              },
              icon: Icon(Icons.settings))
        ],
      ),
      body: ListView(
        children: [
          Header(),
          FunctionButton(),
          Advertisement(),
          InfoList(
            showTitle: true,
          )
        ],
      ),
    );
  }
}
